<template>
    <PageTemplate>
    <div class="pur" slot="content">

        <div class="container container-top " >
            <el-form  label-width="150px"  :model="win" :rules="winRules"   ref="win" >
                <el-collapse v-model="showCollapse2" accordion>
                    <el-collapse-item name="1" class="search-collapse-title">
                        <template slot="title">
                            <span class="vertical-bar" style="margin:0;" ></span>
                            <font  class="collapse-content" >{{$t('cm.baseinfo')}}</font>
                        </template>
                        <div class="div-form">
                            <el-row>
                                <!--主题-->
                                <el-col :span="12">
                                    <el-form-item  :label="$t('pur.process_folio')"  prop="cudWinLevel" >
                                        <el-input   size="small" class="form-input" v-model="win.cudPrizeAmount" :disabled="true" placeholder="提交后自动生成"></el-input>
                                    </el-form-item>
                                </el-col>
                                <!--流程名称-->
                                <el-col :span="12">
                                    <el-form-item :label="$t('pur.process_procChName')">
                                        <el-input   size="small" class="form-input" v-model="flow_access.procChName" :disabled="true"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </div>
                    </el-collapse-item>
                </el-collapse>
                <el-collapse v-model="showCollapse" accordion>
                    <el-collapse-item name="1" class="search-collapse-title">
                        <template slot="title">
                            <span class="vertical-bar" style="margin:0;" ></span>
                            <font  class="collapse-content" >{{$t('te.add')}}( <font >*</font> {{$t('te.must_fill')}})</font>
                        </template>

                        <div class="div-form">
                            <el-row>
                              <el-col :span="12">
                                  <el-form-item :label="$t('pur.process_closereason')" prop="reason" >
                                      <el-input  class="form-input" type="textarea" placeholder="500个字以内" v-model="win.reason" size="small"  ></el-input>
                                  </el-form-item>
                              </el-col>

                            </el-row>
                            <el-row>
                                <!--上传文件-->
                                <el-col :span="12">
                                  <el-form-item :label="$t('fe.uploadFile')">
                                    <FileUploadCommon
                                      @uploadSuccess="uploadSuccess"
                                      @uploadRemove="uploadRemove"
                                      :fileList="fileList"
                                      :limit="1"
                                      >
                                    </FileUploadCommon>
                                  </el-form-item>
                                    <!-- <el-form-item :label="$t('fe.uploadFile')" >
                                        <el-upload :show-file-list="false"
                                        :action="fileUploadUrl"
                                        :on-success="upfileBack"
                                        :flie-list="fileList"
                                        :with-credentials ="true"
                                        :before-upload="beforeUpload"
                                        :on-progress="loadingFile"
                                        :on-error="uplofileError"
                                        >
                                            <el-button class="btn-second"  size="small" >{{$t('fe.upload')}}</el-button>
                                        </el-upload>
                                    </el-form-item> -->
                                </el-col>

                            </el-row>

                        </div>

                    </el-collapse-item>
                </el-collapse>
                <!--流程部分-->
                <el-collapse v-model="showCollapse1" accordion>
                    <el-collapse-item name="1" class="search-collapse-title">
                        <template slot="title">
                            <span class="vertical-bar" style="margin:0;" ></span>
                            <font  class="collapse-content" >{{$t('fe.procDeal')}}</font>
                        </template>
                        <div>
                            <procApprove :isStartAct="isStartAct" :procObj="flowDetails" :flow_access="flow_access" ></procApprove>
                        </div>
                    </el-collapse-item>
                </el-collapse>
            </el-form>
        </div>
        <el-row class="row-empty-30"></el-row>
        <!-- 固定按钮的位置 -->
        <!--使用组件的方式来进行-->
        <fixedbutton >
            <div slot="fixbtn">
                <el-button class="btn-default" type="primary" size="small" @click="saveProc" >{{$t('cm.commit')}}</el-button>
                <el-button class="btn-default" type="primary" size="small" @click="saveDraft">{{$t('cm.savedraft')}}</el-button>
            </div>
        </fixedbutton>
        <PurProcessDemCloseFileList
          ref="PurProcessDemCloseFileList"
          :fileListDislogVisible="fileListDislogVisible"
          @addFileList="addFileList"
          @closeFileListDislog="closeFileListDislog"
        >
        </PurProcessDemCloseFileList>
    </div>
    </PageTemplate>
</template>

<script>
    import PurProcessDemClose from './js/PurProcessDemClose.js'
    export default PurProcessDemClose
</script>

<style>

</style>
